<template>
  <view class="wrap-fff">
    <!--  第三级子品牌  -->
    <view class="title fw-bold fs-36 mb-38">
      {{title}}
    </view>
    <view class="list">
      <view @click="goGoods(item)" class="item" v-for="(item ,index) in selectedBrandSecond" :key="index">
        <easy-loadimage
            mode="widthFix"
            :image-src="item.brand_img"
            width="200rpx"
            height="200rpx"
            borderRadius="12rpx" />
        <view class="r">
          <view>{{item.brand_name}}</view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      title:'',
      ids:''
    }
  },
  computed: {
    selectedBrandSecond() {
      return this.$store.state.app.selectedBrandSecond;
    },
  },
  onLoad(options){
    if(options.title){
      this.title = options.title;
    }
    if(options.ids){
      this.ids = options.ids
    }
  },
  methods: {
    goGoods(item){
      let ids = this.ids;
      ids+=','+item.id;
      uni.navigateTo({
        url: `/pages/admin/goods/skuList?title=${item.brand_name}&ids=${ids}`
      })
    },
  },
}
</script>

<style lang="scss" scoped>
.list{
  .item{
    display: flex;
    border:1rpx solid #f8f8f8;
    padding: 20rpx;
    width: 100%;
    margin-bottom: 30rpx;
    border-radius: 20rpx;
  }
}
</style>